.root {
  background-color: var(--color);
  border-radius: 8px;
  padding: var(--vd-spacing-sm);
  display: flex;
  flex-direction: column;
}

.card {
  cursor: pointer;
  transition: all 0.2s ease-in-out;

  &:hover {
    opacity: 0.9;
    transform: scale(1.02);
  }

  &.detailVisible {
    opacity: 0.1;
  }
}

.category {
  color: var(--front-placeholder-color);
  font-size: 12px;
  margin-bottom: 6px;
}

.name {
  color: var(--front-main-color);
  font-size: 18px;
  margin-bottom: 6px;
  font-weight: bold;
}

.introduce {
  color: var(--front-secondary-color);
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.footer {
  display: flex;
  margin-top: 16px;

  .author {
    flex: 1;
    color: var(--front-placeholder-color);
  }

  .add {
    color: var(--front-main-color);
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;

    &:hover {
      transform: scale(1.2);
    }
  }
}

.mask {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  opacity: 0;
  background-color: rgba(255, 255, 255, 0.408);
  transition: all 0.3s ease-in-out;
}

.detail {
  position: absolute;
  opacity: 0.1;
  transition: all 0.2s ease-in-out;
  top: var(--top);
  left: var(--left);
  width: var(--width);
  height: var(--height);
  box-shadow: 0px 6px 16px -4px gray;

  .promptBody {
    margin-top: var(--vd-spacing-sm);
    flex: 1;
    color: var(--front-secondary-color);
    overflow: auto;

    & > * {
      margin-bottom: var(--vd-spacing-md);
    }

    .prompt {
      white-space: pre-wrap;
    }
  }

  .close {
    position: absolute;
    right: 10px;
    top: 10px;
    color: var(--front-main-color);
    font-size: 18px;
    cursor: pointer;

    &:hover {
      opacity: 0.7;
    }
  }

  &.visible {
    opacity: 1;
    z-index: 100;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 100%;
    max-height: 100%;
    width: 500px;
    height: 500px;

    & + .mask {
      opacity: 1;
    }
  }
}
